package com.joysuch.wwyt.attendant.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joysuch.wwyt.attendant.bean.AttendantPlanContentBean;
import com.joysuch.wwyt.attendant.entity.AttendantPlanContent;
import com.joysuch.wwyt.attendant.mapper.AttendantPlanContentMapper;
import com.joysuch.wwyt.attendant.service.AttendantPlanContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author xsx
 * @version 1.0
 * @date 2023/2/15 11:43
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class AttendantPlanContentServiceImpl extends ServiceImpl<AttendantPlanContentMapper, AttendantPlanContent> implements AttendantPlanContentService {

    @Autowired
    private AttendantPlanContentMapper attendantPlanContentMapper;

    @Override
    public List<AttendantPlanContent> selectByPlanId(Long id) {
        List<AttendantPlanContent> list = attendantPlanContentMapper.selectByPlanId(id);
        return list;
    }

    @Override
    public List<AttendantPlanContentBean> selectBeanByPlanId(Long id) {
        return attendantPlanContentMapper.selectBeanByPlanId(id);
    }

    @Override
    public List<Long> selectIdsByPlanId(Long id) {
        return attendantPlanContentMapper.selectIdsByPlanId(id);
    }

    @Override
    public void deleteByPlanId(Long planId) {
        attendantPlanContentMapper.deleteByPlanId(planId);
    }

    @Override
    public List<AttendantPlanContentBean> selectBeanByPlanIds(List<Long> ids) {
        return attendantPlanContentMapper.selectBeanByPlanIds(ids);

    }
}
